home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
os2
/
blt2_214.zip
/
rexx
/
bltrexx.doc
next >
Wrap
Text File
|
1996-11-23
|
6KB
|
144 lines
Bullet/REXX v2.130
23-Nov-1996
Copyright (C)1996 Cornel Huth
All rights reserved
Contents:
I. Description
II. Installation
III. Using Bullet/REXX
IV. Documentation
V. Quick Start
I. Description
Bullet/REXX is an interface to the database engine called Bullet. It closely
follows the compiler-version of Bullet in programming so any Bullet programmer
can be up and using Bullet/REXX in just a few minutes -- as long as it takes
to read this file. New Bullet programmers will have to learn Bullet first, but
REXX makes this as easy as possible. If you need a database engine, you'll
want to check out this product. One thing Bullet is more than anything else
is fast. There's nothing faster! For example, the compiled version of Bullet
is up to 700 times faster than MS's Access DBMS on inserts, and even the REXX
version can reindex files at the rate of 1 million records/minute using a
typical desktop PC.
II. Installation
Bullet/REXX is a two-DLL package:
o BREXXI2.DLL is the interface between REXX and the
database engine BREXX2.DLL.
o BREXX2.DLL is the database engine itself, a
special-version Bullet made exclusively for Bullet/REXX.
Place these two DLLs in a directory located in the LIBPATH= config.sys
string. Once used, these DLLs stay loaded until the window session is
exited.
III. Using Bullet/REXX
Included with this package are several sample REXX scripts. These are:
o 01init.cmd - minimal example to get you familar with the Bullet style
o 02crd.cmd - shows how to create data files
o 03cri.cmd - shows how to create index files
o 04midd.cmd - shows how to use mid-level data manipulation routines
o 05midm.cmd - shows how to use mid-level memo manipulation routines
o 06midk.cmd - shows how to use mid-level key manipulation routines
o 07hll.cmd - shows how to use the HLL, transaction-based routines
o 08cp.cmd - shows the CP-level calls supported by Bullet/REXX
These examples use a pre-defined data record layout, as defined in each
of the scripts. Bullet/REXX may also be used to read and manipulate data
files generated by other sources (blt_GetDescriptor() is very useful for
doing this). For an example of this in C, see the main Bullet documentation.
These sample scripts serve only to illustrate calling Bullet/REXX.
IV. Documentation
Calls to the database engine in Bullet/REXX are very similar to those in
Bullet. The documentation in BULLET2.INF is generally language-neutral
(any standard compiler can use the compiler version of Bullet) and that
should be used as a reference. This section describes the differences
between the compiler Bullet and the REXX Bullet. See BULLET2.INF for
detailed reference material.
1. Pointers - Bullet/REXX does not use pointers. Any place where you pass
a pointer in Bullet, in Bullet/REXX you either pass a REXX string or
you pass nothing at all. For example, instead of passing AP.keyPtr
pointing to a key buffer to be filled, Bullet/REXX creates a variable
called blt_AP.keyData and places the key in this for you to interrogate
after the call returns. Or, if you are passing data to Bullet, you
place a key in the named variable for Bullet/REXX to use.
The sample scripts exercise all Bullet/REXX calls, so you should be able
to learn Bullet/REXX from them by example.
2. The transaction routines: blt_Insert(), blt_Update(), blt_Reindex(),
blt_Lock(), blt_Unlock(), and blt_Relock() use slightly different-
named structure packs. Bullet/REXX uses blt_TAP.nnn. as the base name
of transaction-based packs (TLP for locks), with the T added and the
number of the pack .1. to .256. in the middle.
To manage the linked-list format of Bullet, Bullet/REXX creates vars
such as blt_TAP.1.stat up to blt_TAP.256.stat (where .stat is the
member named, the same as in compiled Bullet). The sample scripts
show this much better than can be explained in words.
3. The compiler Bullet has redundant shutdowns so that in all but
the worst of hardware crashes the Bullet data files are properly
closed. If Bullet/REXX is run from the command line, it's possible
a REXX syntax error or other error can cause the interpreter to halt
all processing of the script, leaving files possibly open and subject
to corruption (headers not being written). A simple way to fix this
is to prefix all REXX scripts with a call to blt_Exit(). This closes
out any still-running Bullet/REXX process. Another way is to use the
registered exit DLL routine, BulletRexxExit(), which is registered with
RexxRegisterExitDll() during Bullet/REXX initialization.
4. Bullet/REXX has an added pack member in EP: blt_EP.rxAllocsLeft. This
should always return 0 (the net sum of memory allocations and frees).
Due to the interface requirements, Bullet/REXX makes a substantial number
of internal OS calls for memory allocation (REXX string copying), and
this added var is used to verify that no memory leaks exist.
5. Bullet/REXX is limited to a maxiumn of 5 currently open files and 2
concurrently running Bullet/REXX processes. The compiler-version
limits are covered in BULLET2.INF.
6. Bullet/REXX is copyrighted by Cornel Huth, but is available for use,
by any person, FREE of charge. The license terms are the same as those
in the compiler Bullet, covered in BULLET2.INF. You are granted a
single license to use Bullet/REXX if and only if you agree to abide by
the license restrictions listed in the LICENSE AGREEMENT in BULLET2.INF.
You may distribute the two DLLs listed in the Installation section. You
may not redistribute any other files in this package.
V. Quick Start
1. Copy the DLLs to a path on LIBPATH
2. Run 01init.cmd
You may want to redirect output of the sample scripts to a file so
that you can see what would otherwise scroll off the screen.
If you have any errors and cannot resolve them, contact info@40th.com
for limited support. Registered Bullet users only may contact Bullet
tech support at support@40th.com. For current versions visit the
40th Floor BBS at 1-210-684-8065 or visit http://www.40th.com.